using System;

namespace SharpMud.MudLib.SAMPLE.Environment
{
	public class RoomNotFoundException : System.Exception
	{
		private const string defmsg = "The room could not be found within the currently accessible environment system.";
		private const string msgfrmt = "The room '{0}' could not be found within the currently accessible environment system.";

		private RoomID		_RoomID;

		public RoomNotFoundException()
			:this(defmsg,null)
		{
		}

		public RoomNotFoundException(RoomID roomid)
			:this(String.Format(msgfrmt,roomid.StringValue),null)
		{
			if(roomid == null)
				throw new ArgumentNullException("roomid");

			this._RoomID = roomid;
		}

		protected RoomNotFoundException(string message)
			:this(message,null)
		{
		}

		protected RoomNotFoundException(string message, System.Exception innerException)
			:base(message,innerException)
		{
		}

		public RoomID RoomID
		{
			get
			{
				return _RoomID;
			}
		}
	}
}
